package br.com.wai2008.socket.dataobject;

import servidor.localizacao.ILocalizacao;
import servidor.localizacao.LocalizacaoWAI;

import comum.Localizacao;

/**
 * This class represents the Service Data Object.
 * 
 * @since 
 * 		October, 2008.
 * 
 * @version
 * 		WAI2008 - version 1.0
 * 
 * @author 
 * 		Andre Romero Goncales
 */
public class WAIServiceObject {
	
	/**
	 * HD Serial Code.
	 */
	private String hdSerial;

	/**
	 * Network list.
	 */
	private WAINetworkObject[] network;

	/**
	 * Initial's estimated position.
	 */
	private ILocalizacao initialLocalization;

	/**
	 * Route from initialLocalization to target Localization.
	 */
	private Localizacao[] route;

	/**
	 * Target's name.
	 */
	private String targetName;

	/**
	 * Target's estimated position.
	 */
	private Localizacao targetLocalization;

	/**
	 * Floor number.
	 */
	private int floor;

	/**
	 * Restriction number.
	 */
	private int restriction;

	/**
	 * Is simulation?.
	 */
	private boolean simulation;

	/**
	 * Language for messages.
	 */
	private String language;

	/**
	 * Message from the initial node.
	 */
	private String message;

	/**
	 * Get the HD Serial Code.
	 * 
	 * @return
	 * 		HD serial code.
	 */
	public String getHdSerial() {
		return hdSerial;
	}

	/**
	 * Set the HD Serial Code.
	 * 
	 * @param
	 * 		hdSerial the Hd serial code.
	 */
	public void setHdSerial(String hdSerial) {
		this.hdSerial = hdSerial;
	}

	/**
	 * Get the Network List.
	 * 
	 * @return
	 * 		Network list.
	 */
	public WAINetworkObject[] getNetwork() {
		return network;
	}

	/**
	 * Set the Network List
	 * 
	 * @param
	 * 		network the network list.
	 */
	public void setNetwork(WAINetworkObject[] network) {
		this.network = network;
	}

	/**
	 * Get the initial localization.
	 * 
	 * @return
	 * 		initial localization.
	 */
	public ILocalizacao getInitialLocalization() {
		return initialLocalization;
	}

	/**
	 * Set the Initial Localization.
	 * 
	 * @param
	 * 		initialLocalization the initial localization.
	 */
	public void setInitialLocalization(ILocalizacao initialLocalization) {
		this.initialLocalization = initialLocalization;
	}

	/**
	 * Set the Initial Localization.
	 * 
	 * @param
	 * 		x the x position.
	 * @param
	 * 		y the y position.
	 * @param
	 * 		floor the floor number.
	 */
	public void setInitialLocalization(String x, String y) {
		this.initialLocalization = new LocalizacaoWAI(Double.parseDouble(x), Double.parseDouble(y), this.floor);
	}

	/**
	 * Get the route.
	 * 
	 * @return
	 * 		route.
	 */
	public Localizacao[] getRoute() {
		return route;
	}

	/**
	 * Set the Route.
	 * 
	 * @param
	 * 		route the route.
	 */
	public void setRoute(Localizacao[] route) {
		this.route = route;
	}

	/**
	 * Get the Target name.
	 * 
	 * @return
	 * 		target name.
	 */
	public String getTargetName() {
		return targetName;
	}

	/**
	 * Set the Target name.
	 * 
	 * @param
	 * 		targetName the destiny name.
	 */
	public void setTargetName(String targetName) {
		this.targetName = targetName;
	}

	/**
	 * Get the Target localization.
	 * 
	 * @return
	 * 		target localization.
	 */
	public Localizacao getTargetLocalization() {
		return targetLocalization;
	}

	/**
	 * Set the Target Localization.
	 * 
	 * @param
	 * 		targetLocalization the target localization.
	 */
	public void setTargetLocalization(Localizacao targetLocalization) {
		this.targetLocalization = targetLocalization;
	}

	/**
	 * Get the Floor Number.
	 * 
	 * @return
	 * 		floor number.
	 */
	public int getFloor() {
		return floor;
	}

	/**
	 * Set the Floor Number.
	 * 
	 * @param
	 * 		floor the floor number.
	 */
	public void setFloor(int floor) {
		this.floor = floor;
	}

	/**
	 * Get the Restriction Number.
	 * 
	 * @return
	 * 		restriction number.
	 */
	public int getRestriction() {
		return restriction;
	}

	/**
	 * Set the Restriction Number.
	 * 
	 * @param
	 * 		restriction the restriction number.
	 */
	public void setRestriction(int restriction) {
		this.restriction = restriction;
	}

	/**
	 * Get the Simulation flag.
	 * 
	 * @return
	 * 		simulation flag.
	 */
	public boolean isSimulation() {
		return simulation;
	}

	/**
	 * Set the Simulation flag.
	 * 
	 * @param
	 * 		simulation the simulation flag.
	 */
	public void setSimulation(boolean simulation) {
		this.simulation = simulation;
	}

	/**
	 * Get the Language for messages.
	 * 
	 * @return
	 * 		language for messages.
	 */
	public String getLanguage() {
		return language;
	}

	/**
	 * Set the Language for messages.
	 * 
	 * @param
	 * 		language language for messages.
	 */
	public void setLanguage(String language) {
		this.language = language;
	}

	/**
	 * Get the Message for initial node.
	 * 
	 * @return
	 * 		message for initial node.
	 */
	public String getMessage() {
		return message;
	}

	/**
	 * Set the Message for initial node.
	 * 
	 * @param
	 * 		message message for initial node.
	 */
	public void setMessage(String message) {
		this.message = message;
	}	
}
